package com.boot.dog.entities.pojo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.boot.dog.entities.base.BasePojo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @Author: MaxLv
 * @Date: 2019/12/2
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tbl_user")
public class User extends BasePojo {

    private static final long serialVersionUID = 1L;

    @TableField(value = "username")
    @Excel(name = "用户名", orderNum = "0", width = 20)
    private String username;

    @TableField(value = "password")
    private String password;

    @TableField(value = "name")
    @Excel(name = "姓名", orderNum = "1")
    private String name;

    @TableField(value = "user_type")
    @Excel(name = "用户类型", replace = { "内部用户_1", "监管用户_2", "企业用户_3" }, orderNum = "2")
    private String userType;

    @Excel(name = "状态", replace = {"启用_0", "禁用_-1"}, orderNum = "3")
    @TableField(value = "status")
    private Integer status;

    @TableField(value = "org_id")
    private Integer orgId;

    @TableField(value = "enterprise_id")
    private Integer enterpriseId;

    @Excel(name = "密码", orderNum = "4")
    @TableField(value = "decode_password")
    private String decodePassword;

    @TableField(value = "avatar")
    private String avatar;

    @TableField(value = "data_type")
    private Integer dataType;

    @TableField(exist = false)
    private List<Role> roles;

    @TableField(exist = false)
    private List<Permission> permissions;

}
